package com.maiji.cloud.entities.shopingmall;

import com.baomidou.mybatisplus.annotations.TableId;
import com.gitee.sunchenbin.mybatis.actable.annotation.Column;
import com.gitee.sunchenbin.mybatis.actable.annotation.Table;
import com.gitee.sunchenbin.mybatis.actable.constants.MySqlTypeConstant;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import java.io.Serializable;

/**
 *  基金和积分购物优惠规则
 */
@NoArgsConstructor
@Data
@Accessors(chain=true)
@Table(name = "rule_fund_integral")
public class RuleFundIntegral implements Serializable {

    @TableId
    @Column(name = "uu_id", type = MySqlTypeConstant.VARCHAR, length = 50, isKey = true)
    private String uuId;

    @Column(name = "purchase_amount", type = MySqlTypeConstant.DOUBLE, length = 5, decimalLength = 2)
    private Double purchaseAmount;  // 购物金额

    @Column(name = "discount_ratio", type = MySqlTypeConstant.INT, length = 2)
    private Integer discountRatio;  // 减免比例

    @Column(name = "discount_amount", type = MySqlTypeConstant.DOUBLE, length = 5, decimalLength = 2)
    private Double discountAmount;  // 减免金额

    @Column(name = "to_money_ratio", type = MySqlTypeConstant.INT, length = 2)
    private Integer toMoneyRatio;  // 积分兑换购物金额比例(1000%)

    @Column(name = "type", type = MySqlTypeConstant.INT, length = 2)
    private Integer type;  // 1-基金，2-积分

}
